//
//  HZZFUtilsKit-code
//
//  Created by 早范 on 2025/1/28.
//  
//

#import <UIKit/UIKit.h>
#import <CoreTelephony/CTCarrier.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIDevice (HZZF)

/// 系统版本号 (e.g. 8.1)
+ (double)HZZF_systemVersion;

/// 是否是iPad
@property (nonatomic, readonly) BOOL HZZF_isPad;

/// 是否是模拟器
@property (nonatomic, readonly) BOOL HZZF_isSimulator;

@property (nonatomic, readonly) BOOL HZZF_isJailbroken;

/// idfa, iOS10后关闭广告追踪后, 返回为:00000000-0000-0000-0000-000000000000
- (nullable NSString *)HZZF_idfa;

/// idfv
- (nullable NSString *)HZZF_idfv;

- (long)getSystemUpTime;

- (NSString *)battery;

- (int)batteryStatus;

- (int)batteryLevels;

- (float)getTotalDiskSpace;

- (int)getTotalMemory;

+ (int)HZZF_getCPUCores;

+ (NSUInteger)HZZF_getCpuFrequency;
/**
 获取设备型号

 @return e.g. iPhone 2G (A1203)
 */
+ (nullable NSString *)HZZF_getCurrentDeviceModel;

/**
 获取设备型号

 @return e.g. iPhone11,2
 */
+ (NSString *)HZZF_getCurrentRawModel;

/**
 获取设备型号

 @return e.g. iPhone 2G
 */
+ (nullable NSString *)HZZF_getCurrentDeviceShortModel;

/**
 获取屏幕密度

 @return e.g. 326
 */
+ (NSInteger)HZZF_getCurrentDevicePPI;

+ (NSString *)networkStatus;

/// 获取运营商类型
+ (NSInteger)getOperatorsType;

+ (NSString *)mobileCountryCode;

+ (NSString *)mobileNetworkCode;

+ (NSString *)deviceImsi;

/// 判断是否开启了代理
+ (BOOL)checkProxySetting;

+ (NSString *)getBoot;

+ (NSString *)getUpdate;

+ (BOOL)isLandscape;

+ (NSString *)HZZF_getFileTime;

// CD

+ (NSString *)HZZF_bootTimeInSec;
+ (NSString *)HZZF_countryCode;
+ (NSString *)HZZF_language;
// hardware_model
+ (NSString *)HZZF_getHWModel;
+ (NSString* )HZZF_carrierInfo;
+ (CTCarrier *)HZZF_ctcarrierInfo;
+ (NSString *)HZZF_disk;
+ (NSString *) HZZF_memory;
// update_time_nsec iOS 参考代码（输出为纳秒）
+ (NSString *)HZZF_getSysU;
+ (NSInteger)HZZF_getSysUTime;
+ (NSString *)HZZF_timeZone;
+ (NSString *)HZZF_machine;
+ (NSString *)carrierInfo;
+ (NSString *)HZZF_mntId;
+ (NSString *)HZZF_fileInitTime;
+ (NSInteger)HZZF_deviceInitTime;

+ (NSString *)HZZF_openudid;
@end

#ifndef kHZZFSystemVersion
#define kHZZFSystemVersion [UIDevice HZZF_systemVersion]
#endif

#ifndef kHZZFiOS7Later
#define kHZZFiOS7Later (kHZZFSystemVersion >= 7)
#endif

#ifndef kHZZFiOS8Later
#define kHZZFiOS8Later (kHZZFSystemVersion >= 8)
#endif

#ifndef kHZZFiOS9Later
#define kHZZFiOS9Later (kHZZFSystemVersion >= 9)
#endif

#ifndef kHZZFiOS10Later
#define kHZZFiOS10Later (kHZZFSystemVersion >= 10)
#endif

#ifndef kHZZFiOS11Later
#define kHZZFiOS11Later (kHZZFSystemVersion >= 11)
#endif

NS_ASSUME_NONNULL_END
